﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace BoriPeter.FatSecret.Models
{
    [XmlRoot("month", Namespace = "http://platform.fatsecret.com/api/1.0/")]
    public class WeightsGetMonthModel
    {
        /// <summary>
        /// from_date_int is an Int – the first day in the nominated month, see dateint.
        /// </summary>
        [XmlElement("from_date_int")]
        public int FromDateInt { get; set; }

        /// <summary>
        /// to_date_int is an Int – the last day in the nominated month, see dateint.
        /// </summary>
        [XmlElement("to_date_int")]
        public int ToDateInt { get; set; }

        /// <summary>
        /// Each day element contains the weight result for a single day as follows:
        /// </summary>
        [XmlElement("day")]
        public WeightsGetMonthDay[] Days { get; set; }
    }

    public class WeightsGetMonthDay
    {
        /// <summary>
        /// date_int is an Int – the day of the month, see dateint.
        /// </summary>
        [XmlElement("date_int")]
        public int DateInt { get; set; }

        /// <summary>
        /// weight_kg is an Decimal – the recorded weight in killograms.
        /// </summary>
        [XmlElement("weight_kg")]
        public decimal WeightKg { get; set; }

        /// <summary>
        /// weight_comment – the comment recorded by the user (where available).
        /// </summary>
        [XmlElement("weight_comment")]
        public string WeightComment { get; set; }
    }
}
